import { getTheme, setTheme } from "@/utils/theme";

const Theme = parseInt(getTheme()) || 0;

const themeColor = [{
        aside: "background-image: linear-gradient(#001529, #001529);",
        header: "background-image: linear-gradient(to right,#ffffff, #ffffff);",
        container: "background-image: linear-gradient(to bottom right,#ffffff,#ffffff);",
    },
    {
        aside: "background-image: linear-gradient(#2c3e50, #1a2639);",
        header: "background-image: linear-gradient(to right,#ecf0f1, #d6e0e7);",
        container: "background-image: linear-gradient(to bottom right,#f5f7fa, #ecf0f1);",
    },
    {
        aside: "background-image: linear-gradient(#3498db, #2980b9);",
        header: "background-image: linear-gradient(to right,#e0f7fa, #b3e5fc);",
        container: "background-image: linear-gradient(to bottom right,#e0f7fa, #e1f5fe);",
    },
    {
        aside: "background-image: linear-gradient(#8e44ad, #6c3483);",
        header: "background-image: linear-gradient(to right,#f3e5f5, #e1bee7);",
        container: "background-image: linear-gradient(to bottom right,#f3e5f5, #ede7f6);",
    },
    {
        aside: "background-image: linear-gradient(#2c3e50, #34495e);",
        header: "background-image: linear-gradient(to right,#ecf0f1, #bdc3c7);",
        container: "background-image: linear-gradient(to bottom right,#ecf0f1, #f5f7fa);",
    },
    {
        aside: "background-image: linear-gradient(#16a085, #1abc9c);",
        header: "background-image: linear-gradient(to right,#e0f2f1, #b2dfdb);",
        container: "background-image: linear-gradient(to bottom right,#e0f2f1, #e8f5e9);",
    },
    {
        aside: "background-image: linear-gradient(#27ae60, #2ecc71);",
        header: "background-image: linear-gradient(to right,#e8f5e9, #c8e6c9);",
        container: "background-image: linear-gradient(to bottom right,#e8f5e9, #f1f8e9);",
    },
    {
        aside: "background-image: linear-gradient(#f39c12, #f1c40f);",
        header: "background-image: linear-gradient(to right,#fff8e1, #ffecb3);",
        container: "background-image: linear-gradient(to bottom right,#fffde7, #fff8e1);",
    },
    {
        aside: "background-image: linear-gradient(#d35400, #e67e22);",
        header: "background-image: linear-gradient(to right,#fff3e0, #ffe0b2);",
        container: "background-image: linear-gradient(to bottom right,#fff3e0, #fbe9e7);",
    },
    {
        aside: "background-image: linear-gradient(#121212, #212121);",
        header: "background-image: linear-gradient(to right,#424242, #616161);",
        container: "background-image: linear-gradient(to bottom right,#303030, #424242);",
    },
    {
        aside: "background-image: linear-gradient(#0d47a1, #1565c0);",
        header: "background-image: linear-gradient(to right,#bbdefb, #90caf9);",
        container: "background-image: linear-gradient(to bottom right,#e3f2fd, #bbdefb);",
    },
    {
        aside: "background-image: linear-gradient(#004d40, #00695c);",
        header: "background-image: linear-gradient(to right,#b2dfdb, #80cbc4);",
        container: "background-image: linear-gradient(to bottom right,#e0f2f1, #b2dfdb);",
    },
    {
        aside: "background-image: linear-gradient(#880e4f, #ad1457);",
        header: "background-image: linear-gradient(to right,#f8bbd0, #f48fb1);",
        container: "background-image: linear-gradient(to bottom right,#fce4ec, #f8bbd0);",
    },
    {
        aside: "background-image: linear-gradient(#311b92, #4527a0);",
        header: "background-image: linear-gradient(to right,#d1c4e9, #b39ddb);",
        container: "background-image: linear-gradient(to bottom right,#ede7f6, #d1c4e9);",
    },
    {
        aside: "background-image: linear-gradient(#263238, #37474f);",
        header: "background-image: linear-gradient(to right,#cfd8dc, #b0bec5);",
        container: "background-image: linear-gradient(to bottom right,#eceff1, #cfd8dc);",
    },
];

const greetings = [
    ["祝您新的一天工作愉快！",
        "愿您的一天充满活力和快乐！",
        "新的一天，新的开始，加油！",
        "开始美好的一天吧！",
        "我们期待为您提供愉快的体验!",
        "愿您今天比昨天更美好！"
    ],
    ["再忙也别忘了喝水",
        "要来杯下午茶吗？",
        "祝您有美好的午后！",
        "希望我能帮到您!",
        "休息一下吧！",
        "祝您有个愉快的午休。"
    ],
    ["愿您的思维如同阳光一般开阔！",
        "这里是您学习、进步的宝藏之地。",
        "愿我们的服务能带给您愉悦的体验！",
        "给您带来新的信息和机会！",
        "休息一下吧！",
        "让我们一起享受学习和成长的快乐！"
    ],
    ["早点休息哦",
        "放松一下吧！",
        "期待明天的精彩！",
        "我们期待为您提供愉快的体验",
        "感谢自己今天的努力，愿今夜为您带来充足的活力和美好的梦境。",
        "记得喝水，别太累哦！"
    ],
]

export default {
    namespaced: true,
    state: {
        PC: true,
        leave: false,
        themeColor,
        greetings,
        themeIndex: Theme,
        showSidebar: true,
    },
    mutations: {
        SET_THEME_INDEX(state, v) {
            state.themeIndex = v
            setTheme(v)
        },
        SET_SHOW_SIDEBAR(state, v) {
            state.showSidebar = v
        },
        SET_LEAVE(state, v) {
            state.leave = v
        },
        SET_PC(state, v) {
            state.PC = v
        },
    }
}